
package com.uuah.server.api.lifecycle;

import java.util.Collection;
import java.util.Set;

import com.uuah.exception.AbstractUuahException;
import com.uuah.exception.lifecycle.LifecycleException;
import com.uuah.server.lifecycle.LifecycleObject;

public interface ILifecyclePhase {
	String ALL_PHASES = "all";

	void applyLifecycle(Collection objects, String currentPhase)
			throws AbstractUuahException;

	void addOrderedLifecycleObject(LifecycleObject lco);

	void removeOrderedLifecycleObject(LifecycleObject lco);

	Set getOrderedLifecycleObjects();

	void setOrderedLifecycleObjects(Set orderedLifecycleObjects);

	Class[] getIgnoredObjectTypes();

	void setIgnoredObjectTypes(Class[] ignorredObjectTypes);

	Class getLifecycleClass();

	void setLifecycleClass(Class lifecycleClass);

	String getName();

	Set getSupportedPhases();

	void setSupportedPhases(Set supportedPhases);

	void registerSupportedPhase(String phase);

	boolean isPhaseSupported(String phase);

	void applyLifecycle(Object o) throws LifecycleException;

	String getOppositeLifecyclePhase();

}
